<?php
	header("Content-Type:text/html;charset=utf-8");
	require "page.class.php";
	require '../../conn/mysql.php';
	if(isset($_GET['type'])){
		$if='where type="'.$_GET['type'].'" ';

	}else{
		$if='';

	}
	$num=sql("frow", "user", "id", $if);
	$page=new Page($num,20);
	$res=sql("s", "user", "*", $if."{$page->limit}");
	echo '<table cellpadding="2" cellspacing="1" class="table">
		
		<tr>
                <td width="5%" class="list">ID</td>
				<td width="10%" class="list">账号</td>
                <td width="10%" class="list">电话</td>
                <td width="10%"  class="list" >QQ</td>
				<td width="10%"  class="list" >推荐人</td>
                <td width="10%"  class="list" >下家数量</td>		
				<td width="5%"  class="list" >已推广订单</td>	
	           <td width="10%"  class="list" >注册时间</td>
	           <td width="8%"  class="list" >操作</td>
       </tr>';
	if($res){
		foreach ($res as $info){
			echo '<tr class="mouse click">
		<td class="list-text">'.gv($info, "id").'</td>
			<td class="list-text">'.gv($info, "user").'</td>
			<td class="list-text">'.gv($info, "tel").'</td>
		<td class="list-text">'.gv($info, "QQ").'</td>
		<td class="list-text">'.gv($info, "superior").'</td>
		<td class="list-text">'.gv($info, "next_num").'</td>
		<td class="list-text">'.gv($info, "list_num").'</td>
		<td class="list-text">'.zt(gv($info, "time")).'</td>
		<td class="list-text"><a href="user_add.php?id='.gv($info, "id").'" >查看</a>｜<a href="../control.php?oper=user_pwd&id='.gv($info, "id").'" >重置密码</a>｜<a href="../control.php?oper=user_del&id='.gv($info, "id").'" >删除</a></td>
			</tr>';
		}
	}
	
	echo '<tr><td  colspan="9">'.$page->fpage().'</td></tr>';
	echo '</table>';
